package com.example.myroomdemo

import android.app.Application
import androidx.room.Room
import java.util.Calendar.getInstance

/**
 * Created by LFC
on 2020/10/29.
 */
public class MyApp : Application() {
    private var appDB: AppDataBase? = null

    companion object {
        @get:Synchronized
        var mInstance: MyApp? = null
            private set
    }

    override fun onCreate() {
        super.onCreate()
        mInstance = this
        appDB = AppDataBase.getInstance()
    }


    fun getAppDB(): AppDataBase? {
        return appDB
    }

}